<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文章列表 - IP地址查询与分析工具</title>
    <meta name="description" content="查看所有文章列表，获取网络工具使用指南、IP地址知识和网络技术教程。">
    <meta name="keywords" content="文章列表,网络工具,IP地址,网络技术,教程">
    <meta name="author" content="IP地址查询与分析工具">
    <meta property="og:title" content="文章列表 - IP地址查询与分析工具">
    <meta property="og:description" content="查看所有文章列表，获取网络工具使用指南、IP地址知识和网络技术教程。">
    <meta property="og:type" content="website">
    <meta property="og:url" content="http://ip997.ccom/articles/">
    <link rel="canonical" href="https://ip997.ccom/articles/">
    <style>
        /* 基础样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background-color: #f8f9fa;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }

        /* 头部样式 */
        header {
            background-color: #4a6fa5;
            color: white;
            padding: 20px 0;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        header .container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        header h1 {
            font-size: 1.8rem;
            font-weight: 600;
        }

        nav ul {
            display: flex;
            list-style: none;
        }

        nav ul li {
            margin-left: 20px;
        }

        nav ul li a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

        nav ul li a:hover {
            color: #e0e0e0;
        }

        /* 主内容区域 */
        main {
            padding: 40px 0;
        }

        .main-content {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 40px;
        }

        /* 文章列表样式 */
        .article-list {
            background-color: white;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        }

        .article-list h2 {
            font-size: 1.8rem;
            margin-bottom: 20px;
            color: #2c3e50;
            padding-bottom: 10px;
            border-bottom: 2px solid #4a6fa5;
        }

        .tag-filter {
            margin-bottom: 20px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 6px;
        }

        .tag-filter h3 {
            font-size: 1.1rem;
            margin-bottom: 10px;
            color: #555;
        }

        .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .tag {
            display: inline-block;
            padding: 5px 12px;
            background-color: #e9ecef;
            color: #495057;
            text-decoration: none;
            border-radius: 20px;
            font-size: 0.9rem;
            transition: all 0.3s ease;
        }

        .tag:hover {
            background-color: #dee2e6;
        }

        .tag.active {
            background-color: #4a6fa5;
            color: white;
        }

        .article-item {
            padding: 20px 0;
            border-bottom: 1px solid #eee;
            transition: transform 0.2s ease;
        }

        .article-item:hover {
            transform: translateY(-2px);
        }

        .article-item:last-child {
            border-bottom: none;
        }

        .article-item.sticky {
            border-left: 4px solid #ff6b6b;
            padding-left: 15px;
        }

        .article-item h3 {
            font-size: 1.3rem;
            margin-bottom: 8px;
        }

        .article-item h3 a {
            color: #2c3e50;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .article-item h3 a:hover {
            color: #4a6fa5;
        }

        .article-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 10px;
        }

        .article-excerpt {
            color: #555;
            margin-bottom: 15px;
            line-height: 1.6;
        }

        .article-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .article-tag {
            display: inline-block;
            padding: 3px 10px;
            background-color: #e3f2fd;
            color: #1976d2;
            text-decoration: none;
            border-radius: 15px;
            font-size: 0.8rem;
        }

        /* 分页样式 */
        .pagination {
            display: flex;
            justify-content: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #eee;
        }

        .pagination ul {
            display: flex;
            list-style: none;
            gap: 5px;
        }

        .pagination li a {
            display: block;
            padding: 8px 15px;
            background-color: white;
            color: #4a6fa5;
            text-decoration: none;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            transition: all 0.3s ease;
        }

        .pagination li a:hover {
            background-color: #f8f9fa;
            border-color: #4a6fa5;
        }

        .pagination li.active a {
            background-color: #4a6fa5;
            color: white;
            border-color: #4a6fa5;
        }

        .pagination li.disabled a {
            opacity: 0.5;
            pointer-events: none;
        }

        /* 侧边栏样式 */
        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 30px;
        }

        .sidebar-section {
            background-color: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        }

        .sidebar-section h3 {
            font-size: 1.2rem;
            margin-bottom: 15px;
            color: #2c3e50;
            padding-bottom: 8px;
            border-bottom: 2px solid #4a6fa5;
        }

        .sidebar-section ul {
            list-style: none;
        }

        .sidebar-section ul li {
            margin-bottom: 12px;
        }

        .sidebar-section ul li a {
            color: #555;
            text-decoration: none;
            transition: color 0.3s ease;
            display: block;
            padding: 5px 0;
        }

        .sidebar-section ul li a:hover {
            color: #4a6fa5;
            padding-left: 5px;
        }

        /* 底部样式 */
        footer {
            background-color: #2c3e50;
            color: white;
            padding: 30px 0;
            margin-top: 50px;
        }

        footer .container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
        }

        .footer-section h3 {
            font-size: 1.2rem;
            margin-bottom: 15px;
            color: #ecf0f1;
        }

        .footer-section p,
        .footer-section li {
            color: #bdc3c7;
            margin-bottom: 8px;
        }

        .footer-section ul {
            list-style: none;
        }

        .footer-section a {
            color: #bdc3c7;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer-section a:hover {
            color: white;
        }

        .footer-bottom {
            text-align: center;
            padding-top: 20px;
            margin-top: 20px;
            border-top: 1px solid #34495e;
            color: #95a5a6;
        }

        /* 响应式设计 */
        @media (max-width: 768px) {
            .main-content {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            .article-list {
                padding: 20px;
            }

            header .container {
                flex-direction: column;
                gap: 15px;
            }

            nav ul {
                flex-wrap: wrap;
                justify-content: center;
            }

            nav ul li {
                margin: 5px;
            }
        }

        @media (max-width: 480px) {
            .article-list {
                padding: 15px;
            }

            .article-list h2 {
                font-size: 1.5rem;
            }

            .article-item h3 {
                font-size: 1.2rem;
            }

            .article-meta {
                flex-direction: column;
                gap: 5px;
            }
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container">
            <h1>IP地址查询与分析工具</h1>
            <nav>
                <ul>
                    <li><a href="/">首页</a></li>
                    <li><a href="/articles/" style="color: #e0e0e0; font-weight: bold;">文章列表</a></li>
                    <li><a href="#">关于我们</a></li>
                    <li><a href="#">联系方式</a></li>
                </ul>
            </nav>
        </div>
    </header>

    <!-- 主内容 -->
    <main>
        <div class="container">
            <div class="main-content">
                <!-- 文章列表 -->
                <section class="article-list">
                    <h2>文章列表</h2>
                    
                    <!-- 标签筛选 -->
                    <div class="tag-filter">
                        <h3>按标签筛选</h3>
                        <div class="tags">
                            <a href="/articles/" class="tag {% if not current_tag %}active{% endif %}">全部</a>
                            {% for tag in article_tags %}
                                <a href="/articles/?tag={{ tag.name }}" class="tag {% if current_tag == tag.name %}active{% endif %}">{{ tag.name }}</a>
                            {% endfor %}
                        </div>
                    </div>
                    
                    <!-- 文章列表 -->
                    {% if articles %}  
                        {% for article in articles %}  
                            <div class="article-item {% if article.is_sticky %}sticky{% endif %}">
                                <h3><a href="{% url 'article_detail' article.id %}">{{ article.title }}</a></h3>
                                <div class="article-meta">
                                    <span>发布时间：{{ article.publish_date|date:"Y-m-d H:i" }}</span>
                                    <span>阅读量：{{ article.view_count }}</span>
                                    <span>标签：{{ article.tags.count }}个</span>
                                </div>
                                {% if article.summary %}
                                    <div class="article-excerpt">{{ article.summary }}</div>
                                {% else %}
                                    <div class="article-excerpt">{{ article.content|striptags|truncatechars:150 }}</div>
                                {% endif %}
                                <div class="article-tags">
                                    {% for tag in article.tags.all %}
                                        <a href="/articles/?tag={{ tag.name }}" class="article-tag">{{ tag.name }}</a>
                                    {% endfor %}
                                </div>
                            </div>
                        {% endfor %}
                        
                        <!-- 分页 -->
                        <div class="pagination">
                            <ul>
                                {% if articles.has_previous %}
                                    <li><a href="?page=1{% if current_tag %}&tag={{ current_tag }}{% endif %}">&laquo; 首页</a></li>
                                    <li><a href="?page={{ articles.previous_page_number }}{% if current_tag %}&tag={{ current_tag }}{% endif %}">&lsaquo; 上一页</a></li>
                                {% else %}
                                    <li class="disabled"><a href="#">&laquo; 首页</a></li>
                                    <li class="disabled"><a href="#">&lsaquo; 上一页</a></li>
                                {% endif %}
                                
                                {% for i in articles.paginator.page_range %}
                                    {% if i > articles.number|add:'-3' and i < articles.number|add:'3' %}
                                        <li {% if articles.number == i %}class="active"{% endif %}>
                                            <a href="?page={{ i }}{% if current_tag %}&tag={{ current_tag }}{% endif %}">{{ i }}</a>
                                        </li>
                                    {% endif %}
                                {% endfor %}
                                
                                {% if articles.has_next %}
                                    <li><a href="?page={{ articles.next_page_number }}{% if current_tag %}&tag={{ current_tag }}{% endif %}">下一页 &rsaquo;</a></li>
                                    <li><a href="?page={{ articles.paginator.num_pages }}{% if current_tag %}&tag={{ current_tag }}{% endif %}">末页 &raquo;</a></li>
                                {% else %}
                                    <li class="disabled"><a href="#">下一页 &rsaquo;</a></li>
                                    <li class="disabled"><a href="#">末页 &raquo;</a></li>
                                {% endif %}
                            </ul>
                        </div>
                    {% else %}
                        <div class="no-articles">
                            <p>暂无文章</p>
                        </div>
                    {% endif %}
                </section>

                <!-- 侧边栏 -->
                <aside class="sidebar">
                    <!-- 热门网络工具 -->
                    <section class="sidebar-section">
                        <h3>热门网络工具</h3>
                        <ul>
                            {% if hot_tools %}  
                                {% for tool in hot_tools %}  
                                    <li><a href="{% url 'article_detail' tool.id %}">{{ tool.title }}</a></li>
                                {% endfor %}
                            {% else %}
                                <li>暂无热门工具</li>
                            {% endif %}
                        </ul>
                    </section>

                    <!-- 标签云 -->
                    <section class="sidebar-section">
                        <h3>热门标签</h3>
                        <div class="tags">
                            {% for tag in popular_tags %}
                                <a href="/articles/?tag={{ tag.name }}" class="tag">{{ tag.name }} ({{ tag.usage_count }})</a>
                            {% endfor %}
                        </div>
                    </section>
                </aside>
            </div>
        </div>
    </main>

    <!-- 底部 -->
    <footer>
        <div class="container">
            <div class="footer-section">
                <h3>关于我们</h3>
                <p>提供专业的IP地址查询、分析和网络工具服务，帮助用户快速了解IP地址信息和网络状态。</p>
            </div>
            <div class="footer-section">
                <h3>快速链接</h3>
                <ul>
                    <li><a href="/">首页</a></li>
                    <li><a href="/articles/">文章列表</a></li>
                    <li><a href="#">使用帮助</a></li>
                    <li><a href="#">隐私政策</a></li>
                </ul>
            </div>
            <div class="footer-section">
                <h3>联系方式</h3>
                <p>如有问题或建议，欢迎联系我们：</p>
                <p>邮箱：admin@ip997.com</p>
            </div>
        </div>
        <div class="footer-bottom">
            <p>&copy; 2024 IP地址查询与分析工具. 保留所有权利.</p>
        </div>
    </footer>

    <script>
        // 添加一些交互效果
        document.addEventListener('DOMContentLoaded', function() {
            // 平滑滚动到锚点
            document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                anchor.addEventListener('click', function (e) {
                    e.preventDefault();
                    const target = document.querySelector(this.getAttribute('href'));
                    if (target) {
                        target.scrollIntoView({ 
                            behavior: 'smooth',
                            block: 'start'
                        });
                    }
                });
            });
        });
    </script>
</body>
</html>